package ua.kpi_java_training.zabrodskyi.module3;

import static org.junit.Assert.*;

import org.junit.Test;

/**
 * @author Maksym Zabrodskyi
 * @version 24-Jun-2013
 */
public class ElementTypeTest {

	ElementType expectedType;
	ElementType actualType;

	@Test
	public void shouldGetTypePredator() {
		expectedType = ElementType.PREDATOR;
		actualType = ElementType.values()[0];
		assertEquals(expectedType, actualType);
	}

	@Test
	public void shouldGetTypeVictim() {
		expectedType = ElementType.VICTIM;
		actualType = ElementType.values()[1];
		assertEquals(expectedType, actualType);
	}

	@Test
	public void shouldGetTypeBarrier() {
		expectedType = ElementType.BARRIER;
		actualType = ElementType.values()[2];
		assertEquals(expectedType, actualType);
	}

	@Test
	public void shouldCountAllElementTypeIsThree() {
		int actualCountAllTypes = ElementType.values().length;
		assertEquals(3, actualCountAllTypes);
	}

	@Test
	public void testElementTypeToString() {
		String actualElementTypeToString = ElementType.BARRIER.toString();
		assertEquals("BARRIER", actualElementTypeToString);
	}

}
